package cn.lingyangwl.agile.infra.gen.model.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.lingyangwl.agile.model.BasePlusPO;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 模板表
 * @author shenguangyang
 */
@Getter
@Setter
@ToString
@ApiModel(value = "")
@TableName("lcp_template_config")
public class TemplateConfig extends BasePlusPO {
    @TableId
    @Excel(name = "模板序号", orderNum = "10")
    private Long id;

    @NotNull(message = "不能为空")
    @Excel(name = "模板组", orderNum = "20")
    private Long groupId;

    private String groupName;

    /** 模板名称 */
    @NotEmpty(message = "不能为空")
    @Excel(name = "模板名称", orderNum = "30")
    private String name;

    /**
     * 目录
     */
    @Excel(name = "目录", orderNum = "40")
    private String folder;

    /** 文件名称 */
    @NotEmpty(message = "不能为空")
    @Excel(name = "文件名称", width = 50, orderNum = "50")
    private String fileName;

    /** 内容 */
    @NotEmpty(message = "不能为空")
    @Excel(name = "模板内容", width = 100, orderNum = "60")
    private String content;

    /** 是否删除，1：已删除，0：未删除 */
    @Excel(name = "是否被删除", orderNum = "70")
    private String deleted;

    public static LambdaQueryWrapper<TemplateConfig> lqw() {
        return Wrappers.lambdaQuery();
    }
}
